How can I modify the `f` function to handle exceptions from the `outer` function properly

welcome to shbcf.ru